home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / ply15dat.zip / RIVER.PI < prev    next >
Text File  |  1992-10-20  |  4KB  |  150 lines

  1. // Polyray input file: Alexander Enzmann
  2. //
  3. // This is a view of a river winding through a forest, three trees in various
  4. // orientations are instantiated using a color mapped targa for placement. The
  5. // riverbed was created using a draw program, followed by color separation,
  6. // followed by removal of green and blue channels, then a gaussian blue was
  7. // applied to the remaining (red) channel to make the smooth banks on the river.
  8. // The trees were generated with a variant of the SPD tree program, with
  9. // textured spheres used to represent the leaves.
  10. //
  11. // This data file will require at least 4 meg of memory. Depending on which
  12. // memory manager you use, you may need more.  (HIMEM.SYS works on my machine,
  13. // 386MAX runs out of space.)
  14. //
  15. // Render at high resolution in order to see the detail in the trees.  You can
  16. // comment out the trees & use spheres if you want to see how things will be
  17. // laid out without needing huge amounts of memory.
  18. //
  19. viewpoint {
  20.    from <0, 0.9, -7>
  21.    at <0.5, 0, -3.5>
  22.    up <0,1,0>
  23.    angle 45
  24.    resolution 800, 600
  25.    aspect 4/3
  26.    }
  27.  
  28. // Set up background color & lights
  29. background white
  30. light <-20, 100,-5>
  31. include "..\colors.inc"
  32.  
  33. define position_objectx  1
  34. define ripple_normal     2
  35.  
  36. define bumpy_green
  37. texture {
  38.    special surface {
  39.       normal N + dnoise(3*W)
  40.       ambient green, 0.2
  41.       diffuse green, 0.3
  42.       specular white, 0.7
  43.       microfacet Reitz 10
  44.       }
  45.    scale <0.02, 0.02, 0.02>
  46.    }
  47.  
  48. define river_colors
  49. texture {
  50.    noise surface {
  51.       ambient 0.2
  52.       diffuse 0.8
  53.       specular 0.1
  54.       position_fn position_objectx
  55.       normal 3
  56.       frequency 1
  57.       bump_scale 1
  58.       color_map(
  59.          [-130, -127, blue,  blue]
  60.      [-127, -125, blue,  tan]
  61.      [-125, -64,  tan,   tan]
  62.      [-64,  -32,  tan,   green]
  63.      [-32,  130,  green, green])
  64.       }
  65.    rotate <0, 0, 90>
  66.    }
  67.  
  68. define cloudy_sky
  69. texture {
  70.    noise surface {
  71.       ambient 0.9
  72.       diffuse 0
  73.       specular 0
  74.       turbulence 6.0
  75.       position_fn position_objectx
  76.       lookup_fn 1
  77.       octaves 4
  78.       color_map(
  79.      [0.0, 0.6, <0.4, 0.4, 0.4>, <1, 1, 1>]
  80.      [0.6, 0.8, <1, 1, 1>, <0.196078, 0.6, 0.8>]
  81.      [0.8, 1.0, <0.196078, 0.6, 0.8>, <0.196078, 0.6, 0.8>])
  82.       }
  83.    }
  84.  
  85. define blue_ripple
  86. texture {
  87.    noise surface {
  88.       color <0.4, 0.4, 1.0>
  89.       normal ripple_normal
  90.       frequency 35
  91.       bump_scale 1
  92.       ambient 0.3
  93.       diffuse 0.4
  94.       specular white, 0.6
  95.       reflection white, 0.6
  96.       microfacet Reitz 10
  97.       }
  98.    translate <3, 0, -3>
  99.    }
  100.  
  101. object {
  102.      object {
  103.         smooth_height_field "rivermap.tga"
  104.         scale <12, 0.001, 12>
  105.         translate <-6, 0, -6>
  106.         river_colors
  107.         }
  108.    + object {
  109.        polygon 4, <-7, -0.1, -7>, <-7, -0.1, 7>, <7, -0.1, 7>, <7, -0.1, -7>
  110.        blue_ripple
  111.        }
  112.    rotate <0, 10, 0>
  113.    }
  114.  
  115. include "btree1.inc"
  116. include "btree2.inc"
  117. include "btree3.inc"
  118. object {
  119.    gridded "rivtrees.tga",
  120.       //object { sphere <0.5, 0.3, 0.5>, 0.3 shiny_red }
  121.       //object { sphere <0.5, 0.3, 0.5>, 0.3 shiny_green }
  122.       //object { sphere <0.5, 0.3, 0.5>, 0.3 shiny_blue }
  123.       //object { sphere <0.5, 0.3, 0.5>, 0.3 shiny_cyan }
  124.       //object { sphere <0.5, 0.3, 0.5>, 0.3 shiny_yellow }
  125.       //object { sphere <0.5, 0.3, 0.5>, 0.3 shiny_magenta }
  126.       //object { sphere <0.5, 0.3, 0.5>, 0.3 shiny_coral }
  127.       //object { sphere <0.5, 0.3, 0.5>, 0.3 matte_white }
  128.       //object { sphere <0.5, 0.3, 0.5>, 0.3 matte_grey }
  129.       tree1
  130.       tree2
  131.       tree3
  132.       tree1 { translate <-0.5,0,-0.5> rotate <0,120,0> translate <0.5,0,0.5>}
  133.       tree2 { translate <-0.5,0,-0.5> rotate <0,120,0> translate <0.5,0,0.5>}
  134.       tree3 { translate <-0.5,0,-0.5> rotate <0,120,0> translate <0.5,0,0.5>}
  135.       tree1 { translate <-0.5,0,-0.5> rotate <0,240,0> translate <0.5,0,0.5>}
  136.       tree2 { translate <-0.5,0,-0.5> rotate <0,240,0> translate <0.5,0,0.5>}
  137.       tree3 { translate <-0.5,0,-0.5> rotate <0,240,0> translate <0.5,0,0.5>}
  138.    scale <6/32, 6/32, 6/32>
  139.    translate <-6, 0, -6>
  140.    rotate <0, 10, 0>
  141.    }
  142.  
  143. object {
  144.    sphere <0, 0, 0>, 1000
  145.    scale <1, 0.01, 1>
  146.    cloudy_sky { scale <50, 50, 50> }
  147.    shading_flags 0
  148.    rotate <5, 0, 0>
  149.    }
  150.